<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link type="text/css" href="/css/start/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />	
<link type="text/css" href="/css/1pxtable.css" rel="Stylesheet" />	
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.21.custom.min.js"></script>

</head>
<body>
<h1>Repair Parts List</h1>
<form id="form1" name="form1" method="get" action="">
<p>Select The Shop</p>
<select name = 'select' id = 'select'>
	<option value = '22'>ALL</option>
	<option value = '17'>ADPC</option>
	<option value = '18'>BBPC</option>
	<option value = '4'>BHPC</option>
	<option value = '21'>BSIC</option>
	<option value = '1'>BSXP</option>
	<option value = '6'>CBPC</option>
	<option value = '19'>CLPC</option>
	<option value = '2'>CSIC</option>
	<option value = '11'>DCIC</option>
	<option value = '8'>EPPC</option>
	<option value = '14'>FGIC</option>
	<option value = '5'>HPIC</option>
	<option value = '12'>KCPC</option>
	<option value = '10'>NLPC</option>
	<option value = '15'>PMIC</option>
	<option value = '13'>SLIC</option>
	<option value = '9'>WBPC</option>
	<option value = '16'>WGIC</option>	
	<option value = '20'>WHLU</option>
	<option value = '7'>WLIC</option>
</select>

	<input type = 'submit' id ='submit' name = 'submit' value = 'Submit'></input> 

<br />
<br />
<?php 
	$oldShop = '';
	


?>
<?php if(!($_GET)||$_GET['select']==22){?>
<table width="600" border="1" cellspacing="0" cellpadding="15">
	<tr>
		<th>Shop</th>
		<th>Barcode</th>
		<th>Barcode Description</th>
		<th>Move_qty</th>
		<th>Invoice No.</th>
		<th>Staff</th>
		<th>Review date</th>
		<th>Bonus</th>
		
	</tr>
	<?php foreach($this->list as $key=>$v){?>
	<tr>
		<td><?php echo $v['shop_name'];?></td>
		<td><?php echo $v['code_product']?></td>
		<td><?php echo $v['title_product']?></td>
		<td><?php echo $v['qty_product']?></td>
		<td><?php echo $v['id_job']?></td>
		<td><?php echo $v['staff_name']?></td>
		<td><?php echo $v['date_move']?></td>
		<td><input type = 'hidden' name = 'bonus' id = 'bonus' value = '1'>1</input></td>
		
	</tr>
	<?php }?>
</table>
<?php }else{?>
<table width="600" border="1" cellspacing="0" cellpadding="15">
	<tr>
		<th>Shop</th>
		<th>Barcode</th>
		<th>Barcode Description</th>
		<th>Move_qty</th>
		<th>Invoice No.</th>
		<th>Staff</th>
		<th>Review date</th>
		<th>Bonus</th>
	</tr>
	<?php foreach($this->list as $key=>$v){?>
	<tr>
		<td><?php echo $v['shop_name'];?></td>
		<td><?php echo $v['code_product']?></td>
		<td><?php echo $v['title_product']?></td>
		<td><?php echo $v['qty_product']?></td>
		<td><?php echo $v['id_job']?></td>
		<td><?php echo $v['staff_name']?></td>
		<td><?php echo $v['date_move']?></td>
		<td><input type = 'hidden' name = 'bonus' id = 'bonus' value = '1'>1</input></td>
	</tr>
	<?php }?>
	<p>Total Qty:<?php echo $v['total']?></p>
</table>
<?php }?>
</form>

</body>
</html>
